<!-- 
@Description: 
@Author: fcg 
-->
<template>
	<view class="service">

		<view class="wechat box">
			<view class="title">
				添加客服微信加群
			</view>
			<view class="cg-align-center cg-flex-wrap">

				<view class="contact"  v-for="(item,index) in list" :key="index">

					<view class="qrcode">
						<cg-image :src="item.code" width="206rpx" height="206rpx" type="cdn"
							mode="widthFix"></cg-image>
					</view>
					<view class="tips">
						保存图片或复制微信号，添加客服微信
					</view>
					<view class="">
						工作时间：{{item.time}}
					</view>
					<view class="copy cg-align-center cg-justify-center cg-mt-40">
						客服微信：{{item.way}}
						<view class="cg-ml-20">
							<u-button text="复制" @click="$utils.copyText(detail.way)" size="mini"
								:custom-style="{width: '130rpx'}"></u-button>
						</view>
					</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	import {
		getKefuInfo
	} from '@/api/common.js';
	export default {
		data() {
			return {
				detail: {
					code: '',
					way: ''
				},
				list: []
			}
		},
		async created() {
			await this.$getConfig;
			this.getKefuInfo()
		},

		methods: {
			async getKefuInfo() {
				const {
					data
				} = await getKefuInfo();
				// this.detail = data;
				this.list = data;
			}
		},


	}
</script>

<style lang="scss" scoped>
	.service {

	.contact {
		padding: 0 20rpx;
		box-sizing: border-box;
		width: 50%;
	}
		.box {

			box-shadow: 0rpx 6rpx 9rpx 0rpx rgba(197, 197, 197, 0.14);
			background-color: #FFFFFF;
			border-radius: 16rpx;
		}

		.title {
			margin-top: 20rpx;
			padding: 32rpx 40rpx;
			// font-weight: bold;	
			border-bottom: 1rpx dashed #D2D2D2;

		}

		.wechat {
			padding-bottom: 150rpx;
		}

		.qrcode {
			margin-top: 60rpx;
		}

		.content {}

		.tips {
			font-size: 24rpx;
			margin: 16rpx auto;
			color: #C9C9C9;
			text-align: center;
		}
	}
</style>